package com.cloud.uid.service;

import com.xfvape.uid.UidGenerator;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;


@Service
@Slf4j
public class UidGenService {

    @Resource
    private UidGenerator cachedUidGenerator;

    public String getUid() {
        long uid = cachedUidGenerator.getUID();
        log.info("uid: "+uid);
        return cachedUidGenerator.parseUID(uid);

    }
}
